package model

type BusinessExampleEnumFieldType int

const (
	BusinessExampleEnumFieldTypeA = BusinessExampleEnumFieldType(1) // Example enum field A
	BusinessExampleEnumFieldTypeB = BusinessExampleEnumFieldType(2) // Example enum field B
	BusinessExampleEnumFieldTypeC = BusinessExampleEnumFieldType(3) // Example enum field C
)

//go:generate go run ../cmd/generate dao --table business_examples

type BusinessExample struct {
	Model

	Name    *string                       `gorm:"type:string;size:255;not null;default:''"` // 字符串字段
	Value   *uint64                       `gorm:"type:uint;not null;default:0"`             // 整数字段
	Enable  *bool                         `gorm:"type:bool;not null;default:false"`         // 布尔字段
	Type    *BusinessExampleEnumFieldType `gorm:"type:uint;not null;default:1"`             // 枚举字段
	ImageId *string                       `gorm:"type:string;size:32;not null;default:''"`  // 文件ID
}

func (cls *BusinessExample) TableName() string {
	return "business_examples"
}
